<?php

//--------------------------------------------------
//	Filename: profile_edit.php
//--------------------------------------------------
// Information:
// This file shows the settings-menu. 
//--------------------------------------------------

if( !defined('IN_INDEX') )
{
	printError("ACCESS DENIED", "This page is hidden.");
	exit;
}
if(!checkSession())
{
			function redirect($url)
			{
			?>
				<script type="text/javascript">
					{
					window.location = "<?=$url?>";
					}
				</script>
			<?php 
			}
			redirect("index.php?action=login");
	exit;
}
?>
<div id='postpath'>
	<a title="<?php echo translate('gotofrontpage'); ?>" href="index.php"><?php echo translate('home'); ?></a>
    &gt; <a href="index.php?action=blogs" title='<?php echo translate('showallblogs'); ?>'><?php echo translate('blog'); ?></a> 
    &gt; <a href="index.php?action=profile&id=<?php echo $USER->getId(); ?>"><?php echo ucf($USER->getFirstname()) . " " . ucf($USER->getLastname()); ?></a>
	&gt; <a href="index.php?action=profile&sub=edit" title='<?php echo translate('edit'); ?>'><?php echo translate('edit'); ?></a> 
</div>
<br />

<h2><?php echo translate('edit'); ?></h2>

<center>
<table cellpadding="50">

        <tr>
            <td>
                <a href="index.php?action=profile&sub=edit_personal">
                <center><img src="img/personalsettings.png" width="128" height="128" />
                <br />
                <b><?php echo translate('personalsettings'); ?></b></a></center>
            </td>
            
            <td>
                <a href="index.php?action=profile&sub=edit_blog">
                <center><img src="img/blogsettings.png" width="128" height="128"  />
                <br />
                <b><?php echo translate('blogsettings'); ?></b></a></center>
            </td>
            
            <td>
                <a href="index.php?action=profile&sub=edit_general">
                <center><img src="img/globalsettings.png" width="128" height="128" />
                <br />
                <b><?php echo translate('generalsettings'); ?></b></a></center>
            </td>
            <?php
            if($USER->getRank() >= 5)
						{
							?>
						<td>
                <a href="index.php?action=profile&sub=edit_admin">
                <center><img src="img/adminsettings.png" width="128" height="128" />
                <br />
                <b><?php echo translate('adminsettings'); ?></b></a></center>
            </td>
							<?php
						}
						?>
        </tr>        
</table>
</center>